package com.bwie.house.service;

import com.tencentyun.TLSSigAPIv2;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class UserSigService {

    @Value("${IMconfig.sdkAppID}")
    private long sdkAppId;

    @Value("${IMconfig.secreKey}")
    private String secreKey;

    private long expire = 60*60*24*7;

    public String generateUserSig(String userid){
        TLSSigAPIv2 tlsSigAPIv2 = new TLSSigAPIv2(sdkAppId, secreKey);
        return tlsSigAPIv2.genSig(userid,expire);
    }
}
